import { request } from '../utils/request';

export async function fetchOrderList(params) {
  return request('ordersapi/orders/getOrdersInfoList', {
    method: 'POST',
    body: params,
  });
}

export async function fetchOrderDetail(params) {
  return request('ordersapi/orders/getOrdersInfoDetail', {
    method: 'POST',
    body: params,
  });
}

export async function changeOrderStatus(params) {
  return request('userapi/user/getCouponDetail', {
    method: 'POST',
    body: params,
  });
}

export async function exportOrder(params) {
  return request('userapi/user/getCouponDetail', {
    method: 'POST',
    body: params,
  });
}  

export async function closeOrder(params) {
  return request('ordersapi/orders/updateOrdersInfo', {
    method: 'POST',
    body: params,
  });
}

export async function sendOrder(params) {
  return request('ordersapi/orders/updateOrdersPress', {
    method: 'POST',
    body: params,
  });
}

export async function refundOrder(params) {
  return request('ordersapi/orders/updateOrdersRefunds', {
    method: 'POST',
    body: params,
  });
}